package com.x.UserInfo.controller;


import com.x.OrderInfo.controller.OrderInfoFeignController;
import com.x.UserInfo.entity.UserInfo;
import com.x.UserInfo.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author x-cloud
 * @since 2021-07-29
 */
@RestController
@RequestMapping("/userinfo")
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;
    @Autowired
    private OrderInfoFeignController feignController;

    @GetMapping("/list")
    public List<UserInfo> list() {
        return userInfoService.list();
    }

    @GetMapping("/listorder")
    public String listOrder() {
        String result = feignController.list()+"^^^^^^^^^"+Math.random();
        System.out.println(result);
        return result;
    }
}
